﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Framework;

namespace Enterprise.Admin.Handle.Order
{
    public partial class GetDetailJson : AdminBasePage
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            var id = Fq("id").SafeToInt();
            var orderService = new OrderService();
            var row = orderService.GetById(id);
            object result = new
            {
                CoOrderId = row["CoOrderId"].SafeToInt(),
                CoCode = row["CoCode"].SafeToString(),
                CoBuyerName = row["CoBuyerName"].SafeToString(),
                CoMobile = row["CoMobile"].SafeToString(),
                CoTelePhone = row["CoTelePhone"].SafeToString(),
                CoTotalAmount = row["CoTotalAmount"].SafeToString(),
                CoDate = row["CoDate"].SafeToDateTime().ToString("yyyy-MM-dd HH:mm:ss"),
            };
            Json(result);
        }
    }
}